package com.squirrel.common.service;

import com.squirrel.common.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.squirrel.common.param.user.*;
import com.squirrel.common.param.video.PageParam;
import com.squirrel.common.vo.LoginVO;
import com.squirrel.common.vo.user.UserInfoVO;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * UserService 用户服务类
 * </p>
 *
 * @author 关远键
 * @since 2021/11/10 14:25
 */
public interface UserService extends IService<User> {
    LoginVO login(HttpServletResponse response, LoginParam loginParam);

    LoginVO loginByMail(HttpServletResponse response, LoginByMailParam loginByMailParam);

    Boolean register(RegisterParam registerParam);

    String createAuthCode(String mail);

    User getUserByMail(String mail);

    User getUserById(Integer userId);

    List<Integer> getUserIdByKey(PageParam pageParam, String nickname);

    String modify(MultipartFile avatar, ModifyParam param);

    UserInfoVO getAuthorInfo(Integer id);

    LoginVO loginByPhone(HttpServletResponse response, PhoneLoginParam param);

    boolean getCodeByPhone(PhoneParam param);
}
